<?php
	session_start();
	if(!isset($_SESSION['login']))
		$_SESSION['start'] = 1;
?>

<html>
	<head>
		<title>Welcome!</title>
		<link rel="icon" href="images/logo.ico" type="image/x-icon" />
	</head>
	<body>
		<div id="log-in">
			<form id="log-in-form" method="post" action="login.php">
				<table>
					<tr>
						<td>User ID</td>
						<td><input type="textbox" name="user-id"></td>
					</tr>
					<tr>
						<td>Password</td>
						<td><input type="password" name="user-password"></td>
					</tr>
				</table>
				<input type="submit">
				<div style="color: red;">
				<?php
					if(isset($_SESSION['login']))
					{
						if($_SESSION['login']==0){
							echo "invalid user id or password";
							session_destroy();
						}
						else if($_SESSION['login']==1)
							header("Location: admin.php");
						else if($_SESSION['login']>1)
							header("Location: home.php");
					}
				?>
				</div>
			<form>
		</div>
	</body>
</html>